//
//  ButtomAnimationViewController.m
//  PodDemo
//
//  Created by ShiMac on 15/7/25.
//  Copyright © 2015年 guoyan. All rights reserved.
//

#import "ButtomAnimationViewController.h"

@interface ButtomAnimationViewController ()

@end

@implementation ButtomAnimationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    self.view.backgroundColor=[UIColor whiteColor];
    
    
    UIButton *button=[[UIButton alloc] initWithFrame:CGRectMake(100, 100, 60, 30)];
    button.backgroundColor=[UIColor cyanColor];
    button.layer.cornerRadius=4;
    [button setTitle:@"click" forState:UIControlStateNormal];
    
    [button addTarget:self action:@selector(clickAction:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:button];
    
    
    
}

-(void)clickAction:(UIButton *)sender
{
    
    POPSpringAnimation *spring=[POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY];
    spring.springBounciness=18;
    spring.toValue=[NSValue valueWithCGSize:CGSizeMake(1.2, 1.2)];
    [sender pop_addAnimation:spring forKey:@"dd"];
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
